<template>
	<view class="taber">
		<view class="taber_left" style="margin: 0 auto;">
			<view class="taber_left_icon taber_left_margin" @click="onTapClick('/pages/index/index')">
				<image class="taber_left_icon_image" src="../../static/shop_icon.png" mode=""></image>
				<text class="taber_left_icon_name">上云丰</text>
			</view>
			<view v-if="isShowCart" class="taber_left_icon" @click="onTapClick('/pages/cart/cart')">
				<image class="taber_left_icon_image" src="../../static/cart.png" mode=""></image>
				<text class="taber_left_icon_name">购物车</text>
			</view>
		</view>
		<view class="taber_right">
			<button open-type="share" class="taber_right_immediately" type="default">分享到微信好友</button>
		</view>
	</view>
</template>

<script>
	
	export default {
		props:{
			isShowCart:{
				type:Boolean,
				default:true
			}
		},
		methods:{
			onTapClick(url) {
			  uni.switchTab({
			  	url:url
			  })
			}
		}
	}
</script>

<style lang="scss" scoped>
	/* 底部 */
	.taber {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		bottom: 0;
		width: 100%;
		height: 150rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -6rpx 8rpx 0rpx rgba(218, 218, 218, 0.5), 0rpx 0rpx 0rpx 0rpx rgba(229, 229, 229, 1);
	
		&_left {
			display: flex;
			align-items: center;
			margin-left: 30rpx;
	
			&_icon {
				display: flex;
				flex-direction: column;
				align-items: center;
				width: 110rpx;
	
				&_image {
					width: 44rpx;
					height: 44rpx;
				}
	
				&_name {
					// width: 110px;
					// height: 28px;
					margin-top: 2rpx;
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					line-height: 28rpx;
					text-shadow: 0rpx -6rpx 8rpx rgba(218, 218, 218, 0.5);
				}
			}
	
			&_margin {
				margin-right: 10rpx;
			}
		}
	
		&_right {
			display: flex;
			align-items: center;
			margin-right: 30rpx;
	
			&_join {
				width: 216rpx;
				height: 76rpx;
				background: #FFFFFF;
				border-radius: 16rpx;
				border: 2rpx solid #077840;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #077840;
				font-size: 28rpx;
				line-height: 76rpx;
				text-align: center;
				// margin: 0 0 0 10rpx;
			}
	
			&_immediately {
				width: 442rpx;
				height: 76rpx;
				background: #17a452;
				border-radius: 16rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				font-size: 28rpx;
				line-height: 76rpx;
				margin: 0 0 0 10rpx;
				text-align: center;
			}
		}
	}
</style>